<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    function info() {
      var age = 18;
    }
    info();
    console.log(age);   // 报错，提示Uncaught ReferenceError: age is not defined
  </script>
</body>
</html>